while True:  
    try:  
        N = int(input())  
        if N > 0:  
            break  
        else:  
            print("输入错误，请输入一个正整数。")  
    except ValueError:  
        print("输入错误，请输入一个整数。")  
        
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'  
  
current_start_letter = 'A'  
  
for i in range(N):  
    start_letter = current_start_letter  
      
    for j in range(N):  
        print(start_letter, end="")  
          
        start_letter_index = (letters.index(start_letter) + 1) % 26  
        start_letter = letters[start_letter_index]  
      
    print()  
      
    current_start_letter = letters[(letters.index(current_start_letter) + 1) % 26]